package com.flying.framework.annotation.event;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@Target(value={ElementType.TYPE, ElementType.METHOD})
@Retention(value=RetentionPolicy.RUNTIME)
public @interface MethodListener {
	String trigger() default "";
	TimeUnit waitTimeUnit() default TimeUnit.SECONDS;
	long waitTime() default 2L;
	MethodListenerHandler[] handlers() default {};
	ParamSource paramSource() default ParamSource.REQUEST;
	
	enum ParamSource {
		REQUEST, RESPONSE, ALL
	}
}
